home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 3
/
Cream of the Crop 3.iso
/
comm
/
_ter12b.zip
/
TER12B._XE
/
UTILS.EXE
/
SCANMODE.DOC
< prev
next >
Wrap
Text File
|
1993-11-10
|
2KB
|
45 lines
ScanMode is a program developed by Keld "HeartWare" Hansen. It scans
through all modes on a VGA card and notes which modes are text modes and
what their resolution is. It then saves this information in a file of the
following format (PASCAL notation used):
RECORD
Version : BYTE { Must be 6 }
Modes : ARRAY[1..n] OF RECORD
ModeNo : BYTE;
Width : BYTE;
Height : BYTE;
CharWidth : BYTE;
ScanLines : WORD
END
END
The CharWidth and ScanLines are set to zero by ScanMode and are only present
in the file for future use.
To point to the file, a standard is enforced:
The environment variable MODEINFO is used to point to the file.
If the value of MODEINFO is a directory, then the file is called
MODEINFO.DAT in that directory.
If the value of MODEINFO is a file without a file type, then .DAT
is assumed.
If the value of MODEINFO points to an existing file, then that's it!
To switch into a specific text resolution, read the file, comparing the
requested screen width and height to the values found in the record. When a
match is found, you can switch into the mode specified by ModeNo and voilà,
you are in a text mode with that resolution.
Please note, that Borland/Turbo Pascal doesn't recognize these extended
text modes, and that if a person starts up a pascal program while being in
one of these modes, then the initialization code in the CRT unit switches
back into 80x25 (mode 3 or 7). Also note, that WRITE and WRITELN probably
doesn't work in the extended text modes. You will need to do your own screen
handling.
You are hereby granted an unlimited license to distribute this archive with
your Public Domain programs, and the format of the file is released as Public
Domain as well. If you want to distribute it as part of a shareware package,
the only price I ask is a free registration of the program you want to send
the SCANMODE archive with.